package chapter13;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Calendar;
import java.util.Date;

/**
 * Created by lenovo on 2016/4/16.
 */
/*
public class TemporelTest {
    public static void main(String[] args) {
        System.out.println(
                LocalDate.of(1975,5,26)
                         .plusDays(5)
                         .plusMonths(6)
                         .plusWeeks(3)
                         .format(DateTimeFormatter.ofPattern("E MM/DD/YYYY"))
        );
    }
}
*/

public class TemporelTest {
    public static void main(String[] args) {
        Calendar calendar=Calendar.getInstance();
        calendar.set(1975,Calendar.MAY,26,0,0,0);
        calendar.add(Calendar.DAY_OF_MONTH,5);
        calendar.add(Calendar.MONTH,6);
        calendar.add(Calendar.WEEK_OF_MONTH,3);
        SimpleDateFormat df=new SimpleDateFormat("E MM/DD/YYYY");
        System.out.println(df.format(calendar.getTime()));
    }
}